package com.bookcloud.java21.chapter7.自定义异常76;

// 非受检自定义异常
public class MyRuntimeException extends RuntimeException {
  public MyRuntimeException() {}

  public MyRuntimeException(String message) {
    super("【自定义非受检异常】：" + message);
  }

  public MyRuntimeException(int code, String message) {
    super("【自定义非受检异常】" + code + "：" + message);
  }

  public MyRuntimeException(int code, String message, Throwable cause) {
    super("【自定义非受检异常】" + code + "：" + message, cause);
  }

  public MyRuntimeException(
      int code,
      String message,
      Throwable cause,
      boolean enableSuppression,
      boolean writableStackTrace) {
    super("【自定义非受检异常】   ：" + message, cause, enableSuppression, writableStackTrace);
  }
}
